//
//  RZMainViewController.m
//  navDemo
//
//  Created by 任征 on 2017/3/24.
//  Copyright © 2017年 Facebook. All rights reserved.
//

#import "RZMainViewController.h"


@interface RZMainViewController ()

@end

@implementation RZMainViewController

- (void)viewDidLoad {
  [super viewDidLoad];
  XELog(@"%f====%f", self.view.bounds.size.width, self.view.bounds.size.height);
  // 监听通知
  NSNotificationCenter *noCenter = [NSNotificationCenter defaultCenter];
  
  [noCenter addObserver:self selector:@selector(creatCustomerInfo) name:@"udeskIM" object:nil];
  
}

- (instancetype)initWithProperties:(NSDictionary *)props options:(NSDictionary *)launchOptions {
  self = [super init];
  ReactView *reactView = [[ReactView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, self.view.bounds.size.height) properties:props options:launchOptions];
  reactView.backgroundColor = [[UIColor alloc] initWithRed:1.0f green:1.0f blue:1.0f alpha:1];
  [self.view addSubview:reactView];
  
  return self;
}

- (void) creatCustomerInfo {
  XELog(@"===收到通知=creatCustomerInfo=");
}

- (void)dealloc {
  [[NSNotificationCenter defaultCenter] removeObserver:self];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
